#mapping-script
# -*- coding: ms949 -*-
from datetime import datetime 

def isoDateTimeFormat(inn):
    return datetime.strptime(inn,'%Y%m%d%H%M%S').isoformat()    #1996-08-08T13:00:00

def isoDateFormat(inn):
    date = datetime.strptime(inn,'%Y%m%d').isoformat()    #1996-08-08
    return date[0:10]
    
def edifactYYYYMMDD(inn):
    return inn[0:4]+inn[5:7]+inn[8:10]

def edifactYYYYMMDDHHNN(inn):
    return inn[0:4]+inn[5:7]+inn[8:10]+inn[11:13]+inn[14:16]

def edifactYYYYMMDDHHNNSS(inn):
    return inn[0:4]+inn[5:7]+inn[8:10]+inn[11:13]+inn[14:16]+inn[17:19]


